package com.ytjj.qmyx.mall.mapper;

import com.ytjj.qmyx.mall.model.*;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface ComplaintsRecordsMapper {
    long countByExample(ComplaintsRecordsExample example);

    int deleteByExample(ComplaintsRecordsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(ComplaintsRecords record);

    int insertSelective(ComplaintsRecords record);

    List<ComplaintsRecords> selectByExample(ComplaintsRecordsExample example);

    ComplaintsRecords selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") ComplaintsRecords record, @Param("example") ComplaintsRecordsExample example);

    int updateByExample(@Param("record") ComplaintsRecords record, @Param("example") ComplaintsRecordsExample example);

    int updateByPrimaryKeySelective(ComplaintsRecords record);

    int updateByPrimaryKey(ComplaintsRecords record);

    /**
     * 根据投诉订单号查询投诉单
     * @param complaintId
     * @return
     */
    ComplaintsRecords queryByComplaintId(@Param("complaintId") String complaintId);

    /**
     * 根据条件查询微信投诉信息
     * @param request
     * @return
     */
    List<WxComplaintsListResponse> wxComplaintsV3List(WxComplaintsListRequest request);

    /**
     * 根据投诉单号查询支付配置id
     */
    Integer getMchIdByComplaintId(@Param("complaintId") String complaintId);

    /**
     * 根据支付单号获取微信商户号
     */
    List<ComplaintsMchIdResponse> queryMchId(@Param("outTradeNoList") List<String> outTradeNoList);

    /**
     * 查询投诉详情
     */
    WxComplaintsListResponse queryComplaintsById(@Param("complaintId") String complaintId);

    /**
     * 根据支付单号查询投诉单
     */
    List<OrderComplainResponse> getComplaintsByPayNos(@Param("payNos") List<String> payNos);
}